#ifndef _PNGIMAGE_H_
#define _PNGIMAGE_H_

#ifdef __cplusplus
extern "C"
{
#endif

#ifdef __cplusplus
}
#endif

#include <string>
#include <string.h>
#include <stdio.h>
#include <png.h>

#include "Image.h"

class PngImage;

class PngImage : public Image
{
public:

private:
    png_structp png_ptr;
    png_infop info_ptr;
    FILE *file;
    unsigned long line_bytes; // 一行的字节数

public:
    PngImage(std::string path);
    ~PngImage();

    void GetImage(unsigned char *buf, unsigned long line) override;
};





#endif
